package com.mstanford.movie.controller;

import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import com.mstanford.movie.utils.ConstantUtil;

public class ParamListener implements ServletContextListener {

	public void contextInitialized(ServletContextEvent sce) {
		
		ServletContext sc = sce.getServletContext();

		ConstantUtil.DRIVER = sc.getInitParameter("driver");
		ConstantUtil.URL = sc.getInitParameter("url");
		ConstantUtil.USER = sc.getInitParameter("user");
		ConstantUtil.PASSWORD = sc.getInitParameter("password");
	}
	
	public void contextDestroyed(ServletContextEvent sce) {}
}